package com.briup.day09.bean;

public class School {
    public static String library = "栋梁图书馆";
    private String name;
    private int num=1999;
    //会随着类加载执行 且只执行一次
    static {
        //静态代码块
        library="凌云图书馆";
        System.out.println("静态代码块......");
    }

    {
        //构造代码块
        System.out.println("构造代码块......");
    }

    public School() {
        System.out.println("School()......");
    }
    public School(String name, int num) {
        System.out.println("师生数量"+this.num);
        System.out.println("School(String int)......");
        this.name = name;
        this.num = num;
    }
public void show(){
    System.out.println("图书馆名称: "+School.library+this.num);
}
}
